<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>老人健康体检详情</title>
    <#include "/common/resource.ftl">
    <script type="text/javascript">
        $(function () {
            <#if (params.id)??>
                $.ajaxRequest({
                    url: '${params.contextPath}/web/elderHealth/queryAll.json',
                    data: {id: "${params.id}"},
                    success: function (data) {
                        if (!data.success) {
                            $.message(data.message);
                            return;
                        }
                        var record = data.data;
                        console.log(record)
                        // 获取主表信息
                        var elderHealth = record.elderHealth;
                        for (var key in elderHealth) {
                            $("[field='" + key + "']").html(elderHealth[key]);
                        }
                        // 获取生活习惯
                        var elderLifeStyle = record.elderLifeStyle;
                        for (var key in elderLifeStyle) {
                            $("[field='" + key + "']").html(elderLifeStyle[key]);
                        }
                        // 获取脏器功能
                        var elderOrganFunction = record.elderOrganFunction;
                        for (var key in elderOrganFunction) {
                            $("[field='" + key + "']").html(elderOrganFunction[key]);
                        }
                        // 获取现存主要健康问题
                        var elderHealthQuestion = record.elderHealthQuestion;
                        for (var key in elderHealthQuestion) {
                            $("[field='" + key + "']").html(elderHealthQuestion[key]);
                        }
                        // 获取住院治疗情况
                        var elderHospitalization = record.elderHospitalization;
                        var elderStr = "";
                        var familyStr = "";
                        for (var i = 0; i < elderHospitalization.length; i++) {
                            if (elderHospitalization[i].type == 1) {
                                elderStr += "<tr><td>"+ elderHospitalization[i].hospitalHistory1StartStr +"</td><td>"+ elderHospitalization[i].hospitalHistory1EndStr +"</td><td>"+ elderHospitalization[i].hospitalHistory1Reason +"</td><td>"+ elderHospitalization[i].hospitalHistory1Orgname +"</td><td>" + elderHospitalization[i].hospitalHistory1Number + "</td></tr>";
                            } else if (elderHospitalization[i].type == 2) {
                                familyStr += "<tr><td>"+ elderHospitalization[i].hospitalHistory1StartStr +"</td><td>"+ elderHospitalization[i].hospitalHistory1EndStr +"</td><td>"+ elderHospitalization[i].hospitalHistory1Reason +"</td><td>"+ elderHospitalization[i].hospitalHistory1Orgname +"</td><td>" + elderHospitalization[i].hospitalHistory1Number + "</td></tr>";
                            }
                        }
                        if (elderStr == '') {
                            elderStr = "<tr><td colspan='5'>老人没有任何住院记录!</td></tr>";
                        }
                        $("#elderHospital").append(elderStr);
                        if (familyStr == '') {
                            familyStr = "<tr><td colspan='5'>家属没有任何住院记录!</td></tr>";
                        }
                        $("#familyHospital").append(familyStr);
                        // 获取用药情况
                        var elderPharmacyList = data.data.elderPharmacyList;
                        var str = "";
                        for (var i = 0; i < elderPharmacyList.length; i++) {
                            str += "<tr><td>"+ elderPharmacyList[i].medicinalName +"</td><td>"+ elderPharmacyList[i].medicinalUse +"</td><td>"+ elderPharmacyList[i].medicinalNumber +"</td><td>"+ elderPharmacyList[i].medicinalTimeStr +"</td><td>" + elderPharmacyList[i].medicinalCompliance + "</td></tr>";
                        }
                        if (str == "") {
                            str = "<tr><td colspan='5'>没有任何用药记录!</td></tr>";
                        }
                        $("#medicine").append(str);
                        // 获取健康指导
                        var elderHealthEvaluation = record.elderHealthEvaluation;
                        for (var key in elderHealthEvaluation) {
                            $("[field='" + key + "']").html(elderHealthEvaluation[key]);
                        }
                    }
                });
            </#if>
        });
    </script>
    <style>
        .layui-card-header{font-weight:bold;}
        .layui-table th{background-color:#f2f2f2 !important;width:120px;}
    </style>
</head>
<body style="background:#eee;">
<div class="ui-table-div">
    <div class="layui-card">
        <div class="layui-card-header">基本信息</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table">
                <tr>
                    <th>姓名</th>
                    <td field="name">--</td>
                    <th>体检日期</th>
                    <td field="physicalExaminationTimeStr">--</td>
                </tr>
                <tr>
                    <th>责任医生</th>
                    <td field="doctorId">--</td>
                    <th>症状</th>
                    <td field="symptom">--</td>
                </tr>
                <tr>
                    <th>其他症状备注</th>
                    <td field="symptomRemark">--</td>
                    <th>体温(摄氏度)</th>
                    <td field="temperature">--</td>
                </tr>
                <tr>
                    <th>脉率(次/分钟)</th>
                    <td field="pulseRate">--</td>
                    <th>呼吸频率(次/分钟)</th>
                    <td field="respirationRate">--</td>
                </tr>
                <tr>
                    <th>左侧血压(mmHg)</th>
                    <td field="leftBloodPressure">--</td>
                    <th>右侧血压(mmHg)</th>
                    <td field="rightBloodPressure">--</td>
                </tr>
                <tr>
                    <th>身高(cm)</th>
                    <td field="height">--</td>
                    <th>体重(kg)</th>
                    <td field="weight">--</td>
                </tr>
                <tr>
                    <th>腰围(cm)</th>
                    <td field="waistline">--</td>
                    <th>体质指数(kg/m2)</th>
                    <td field="bmi">--</td>
                </tr>
                <tr>
                    <th>健康自我评估</th>
                    <td field="healthSelfAppraisal">--</td>
                    <th>自理能力自我评估</th>
                    <td field="selfcareAbilityAppraisal">--</td>
                </tr>
                <tr>
                    <th>认知功能</th>
                    <td field="cognitiveFunction">--</td>
                    <th>简易智力检查分数</th>
                    <td field="cognitiveFunctionScore">--</td>
                </tr>
                <tr>
                    <th>情感状态</th>
                    <td field="affectiveState">--</td>
                    <th>老年人抑郁检查分数</th>
                    <td field="affectiveStateScore">--</td>
                </tr>
            </table>
        </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header">生活方式</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table">
                <tr>
                    <th>体育锻炼频率</th>
                    <td field="physicalExerciseRate">--</td>
                    <th>每次锻炼时间(分钟)</th>
                    <td field="physicalExerciseTime">--</td>
                </tr>
                <tr>
                    <th>坚持锻炼(年)</th>
                    <td field="physicalExerciseYears">--</td>
                    <th>锻炼方式</th>
                    <td field="physicalExerciseMod">--</td>
                </tr>
                <tr>
                    <th>饮食习惯</th>
                    <td field="dietaryHabit">--</td>
                    <th>吸烟状况</th>
                    <td field="smokeStatus">--</td>
                </tr>
                <tr>
                    <th>日吸烟量</th>
                    <td field="smokeDailyNum">--</td>
                    <th>开始吸烟年龄</th>
                    <td field="smokeStartAge">--</td>
                </tr>
                <tr>
                    <th>戒烟年龄</th>
                    <td field="smokeEndAge">--</td>
                    <th>饮酒状况</th>
                    <td field="drinkStatus">--</td>
                </tr>
                <tr>
                    <th>日饮酒量(两)</th>
                    <td field="drinkDailyNum">--</td>
                    <th>是否戒酒</th>
                    <td field="isAbstinence">--</td>
                </tr>
                <tr>
                    <th>戒酒年龄</th>
                    <td field="abstinenceAge">--</td>
                    <th>开始饮酒年龄</th>
                    <td field="drinkStartAge">--</td>
                </tr>
                <tr>
                    <th>近一年是否饮酒</th>
                    <td field="isDrunkennessInOneYear">--</td>
                    <th>饮酒种类</th>
                    <td field="drinkKind">--</td>
                </tr>
                <tr>
                    <th>饮酒种类其他名称</th>
                    <td field="drinkKindOtherName">--</td>
                    <th>是否职业病危害因素接触史</th>
                    <td field="isOccupationalHazardExposureHistory">--</td>
                </tr>
                <tr>
                    <th>职业病工种</th>
                    <td field="occupationalHazardProfession">--</td>
                    <th>职业病从业年数</th>
                    <td field="occupationalHazardYears">--</td>
                </tr>
                <tr>
                    <th>粉尘种类</th>
                    <td field="dustType">--</td>
                    <th>是否粉尘防护</th>
                    <td field="isDustProtect">--</td>
                </tr>
                <tr>
                    <th>放射物质种类</th>
                    <td field="radiogenicType">--</td>
                    <th>是否放射物质防护</th>
                    <td field="isRadiogenicProtect">--</td>
                </tr>
                <tr>
                    <th>物理因素种类</th>
                    <td field="physicalFactorType">--</td>
                    <th>是否物理因素防护</th>
                    <td field="isPhysicalFactorProtect">--</td>
                </tr>
                <tr>
                    <th>化学物质种类</th>
                    <td field="chemicalSubstancesType">--</td>
                    <th>是否化学物质防护</th>
                    <td field="isChemicalSubstancesProtect">--</td>
                </tr>
                <tr>
                    <th>其他毒物</th>
                    <td field="otherType">--</td>
                    <th>其他毒物是否防护</th>
                    <td field="isOtherProtect">--</td>
                </tr>
            </table>
        </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header">脏器功能</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table">
                <tr>
                    <th>口唇状态</th>
                    <td field="oralCavityLipsStatus">--</td>
                    <th>齿列状态</th>
                    <td field="oralCavityDentitionStatus">--</td>
                </tr>
                <tr>
                    <th>咽部状态</th>
                    <td field="oralCavityPharyngealStatus">--</td>
                    <th>是否桶状胸</th>
                    <td field="isLungBarrelChest">--</td>
                </tr>
                <tr>
                    <th>呼吸音状态</th>
                    <td field="lungBreathSoundsStatus">--</td>
                    <th>呼吸音异常信息</th>
                    <td field="lungBreathSoundsAbnormal">--</td>
                </tr>
                <tr>
                    <th>听力状态</th>
                    <td field="hearingStatus">--</td>
                    <th>运动功能</th>
                    <td field="motorFunction">--</td>
                </tr>
                <tr>
                    <th>皮肤状态</th>
                    <td field="skinStatus">--</td>
                    <th>其他皮肤状态</th>
                    <td field="skinStatusOther">--</td>
                </tr>
                <tr>
                    <th>巩膜状态</th>
                    <td field="scleraStatus">--</td>
                    <th>其他巩膜状态</th>
                    <td field="scleraStatusOther">--</td>
                </tr>
                <tr>
                    <th>淋巴结状态</th>
                    <td field="lymphadenStatus">--</td>
                    <th>其他淋巴结状态</th>
                    <td field="lymphadenStatusOther">--</td>
                </tr>

                <tr>
                    <th>罗音状态</th>
                    <td field="lungRaleStatus">--</td>
                    <th>其他罗音状态</th>
                    <td field="lungRaleStatusOther">--</td>
                </tr>
                <tr>
                    <th>心率(次/分钟)</th>
                    <td field="heartRate">--</td>
                    <th>心律</th>
                    <td field="heartRhythmStatus">--</td>
                </tr>
                <tr>
                    <th>杂音</th>
                    <td field="heartNoise">--</td>
                    <th>杂音说明</th>
                    <td field="heartNoiseYes">--</td>
                </tr>
                <tr>
                    <th>是否腹部压痛</th>
                    <td field="abdomenTendernessStatus">--</td>
                    <th>腹部压痛说明</th>
                    <td field="abdomenTendernessYes">--</td>
                </tr>
                <tr>
                    <th>是否腹部包块</th>
                    <td field="abdomenEnclosedmassStatus">--</td>
                    <th>腹部包块说明</th>
                    <td field="abdomenEnclosedmassYes">--</td>
                </tr>
                <tr>
                    <th>是否腹部肝大</th>
                    <td field="abdomenHepatomegalyStatus">--</td>
                    <th>腹部肝大说明</th>
                    <td field="abdomenHepatomegalyYes">--</td>
                </tr>
                <tr>
                    <th>是否腹部脾大</th>
                    <td field="abdomenSplenauxeStatus">--</td>
                    <th>腹部脾大说明</th>
                    <td field="abdomenSplenauxeYes">--</td>
                </tr>
                <tr>
                    <th>是否移动性浊音</th>
                    <td field="abdomenShiftingDullnessStatus">--</td>
                    <th>移动性浊音说明</th>
                    <td field="abdomenShiftingDullnessYes">--</td>
                </tr>
                <tr>
                    <th>下肢水肿</th>
                    <td field="lowerExtremityEdemaStatus">--</td>
                    <th>足背动脉搏动</th>
                    <td field="footPulsesDorsalStatus">--</td>
                </tr>
                <tr>
                    <th>肛门指诊</th>
                    <td field="anusDreStatus">--</td>
                    <th>其他肛门指诊说明</th>
                    <td field="anusDreStatusOther">--</td>
                </tr>
                <tr>
                    <th>乳腺状态</th>
                    <td field="breastStatus">--</td>
                    <th>其他乳腺状态说明</th>
                    <td field="breastStatusOther">--</td>
                </tr>
                <tr>
                    <th>其他脏器功能说明</th>
                    <td field="otherRemark">--</td>
                    <th>辅助检查说明</th>
                    <td field="accessoryExaminationRemark">--</td>
                </tr>

            </table>
        </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header">现存主要健康问题</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table">
                <tr>
                    <th>脑血管疾病状态</th>
                    <td field="cerebrovascularDiseaseStatus">--</td>
                    <th>其他脑血管疾病说明</th>
                    <td field="cerebrovascularDiseaseStatusOrher">--</td>
                </tr>
                <tr>
                    <th>肾脏疾病状态</th>
                    <td field="kidneyDiseaseStatus">--</td>
                    <th>其他肾脏疾病说明</th>
                    <td field="kidneyDiseaseStatusOther">--</td>
                </tr>
                <tr>
                    <th>心脏疾病状态</th>
                    <td field="heartDiseaseStatus">--</td>
                    <th>其他心脏疾病说明</th>
                    <td field="heartDiseaseStatusOther">--</td>
                </tr>
                <tr>
                    <th>血管疾病状态</th>
                    <td field="angiopathyStatus">--</td>
                    <th>其他血管疾病说明</th>
                    <td field="angiopathyStatusOther">--</td>
                </tr>
                <tr>
                    <th>眼部疾病状态</th>
                    <td field="eyeDiseaseStatus">--</td>
                    <th>其他眼部疾病说明</th>
                    <td field="eyeDiseaseStatusOther">--</td>
                </tr>
                <tr>
                    <th>神经系统疾病状态</th>
                    <td field="nervousDiseaseStatus">--</td>
                    <th>神经系统疾病说明</th>
                    <td field="nervousDiseaseYes">--</td>
                </tr>
                <tr>
                    <th>其他系统疾病</th>
                    <td field="otherDiseaseStatus">--</td>
                    <th>其他系统疾病说明</th>
                    <td field="otherDiseaseYes">--</td>
                </tr>
            </table>
        </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header">老人住院情况</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table" id="elderHospital">
                <tr>
                    <th>入院日期</th>
                    <th>出院日期</th>
                    <th>住院原因</th>
                    <th>住院机构名称</th>
                    <th>病案号</th>
                </tr>
            </table>
        </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header">家人住院情况</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table" id="familyHospital">
                <tr>
                    <th>入院日期</th>
                    <th>出院日期</th>
                    <th>住院原因</th>
                    <th>住院机构名称</th>
                    <th>病案号</th>
                </tr>
            </table>
        </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header">主要用药情况</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table" id="medicine">
                <tr>
                    <th>药物名称</th>
                    <th>用法</th>
                    <th>用量</th>
                    <th>用药时间</th>
                    <th>依从性</th>
                </tr>
            </table>
        </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header">健康评价与指导</div>
        <div class="layui-card-body">
            <table class="layui-table ui-table">
                <tr>
                    <th>体检是否有异常</th>
                    <td field="isException">--</td>
                    <th>异常2</th>
                    <td field="exception2">--</td>
                </tr>
                <tr>
                    <th>异常1</th>
                    <td field="exception1">--</td>
                    <th>异常3</th>
                    <td field="exception3">--</td>
                </tr>
                <tr>
                    <th>异常4</th>
                    <td field="exception4">--</td>
                    <th>健康指导</th>
                    <td field="healthGuide">--</td>
                </tr>
                <tr>
                    <th>危险因素控制</th>
                    <td field="dangerControl">--</td>
                    <th>目标体重</th>
                    <td field="targetWeight">--</td>
                </tr>
                <tr>
                <tr>
                    <th>接种疫苗</th>
                    <td field="vaccinum">--</td>
                    <th>其他危险因素</th>
                    <td field="dangerControlOther">--</td>
                </tr>
            </table>
        </div>
    </div>
</div>
</body>

</html>
